/*
 * memorymanager.h
 *
 *  Created on: Jan 12, 2011
 *      Author: dima
 */

#ifndef MEMORYMANAGER_H_
#define MEMORYMANAGER_H_


template <class T>
class DoubleBuffered
{
	T mA;
	T mB;

public:
	void write(T a)
	{
		mA = a;
	}
	T read()
	{
		return mB;
	}

	void flip()
	{
		T tmp = mB;
		mB = mA;
		mA = tmp;
	}
};

class MemoryManager
{
private:
	MemoryManager();
public:

	virtual ~MemoryManager();
};

#endif /* MEMORYMANAGER_H_ */
